package com.a2020111222.test.mapper;

import com.a2020111222.test.pojo.classInfo;
import org.apache.ibatis.annotations.*;

import java.util.List;

/**
 * @author Administrator
 * @version 1.0
 * @description: TODO
 * @date 2022/10/24 8:52
 */

public interface classMapper {
    List<classInfo> selectList(long id);
//    注解一对多
    @Select("select * from clsinfo where clsId=#{id};")
    @Results({
            @Result(id = true,property="clsId",column="clsId"),
            @Result(column = "clsId", property = "menus",many=@Many(select = "com.a2020111222.test.mapper.menuMapper.selectMenuByClsId2"))
    })
    List<classInfo> selectList2(long id);
}
